<?php
define("_needlogin", "1");
define("_access", "1");
include_once("include/db.config.php");?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<meta charset="utf-8"/>
<?php include("include/head.php"); ?>
<link rel="stylesheet" href="./source/radio.css"/>
<body>
<?php include("include/nav.php");
  if(!isset($end)){      $results['radio']=json_decode($results['radio']);
        ?>
   <form action="challenge_radio.php" method="post" id="form">
   <div class="container" id="con">
    <p><?= $_SESSION['num']  ?>.<?= $results['content'] ?></p>
    <div class="input">
        <?php foreach($results['radio'] as $key =>$value){  ?>
    <input type="radio" name="<?= $results['id'] ?>" value="<?php echo chr(97+$key); ?>"/><span><?= $value; ?></span><br/>
        <?php } ?>
<!--    <input type="radio" name="--><?//= $results['id'] ?><!--" value="b"/><span>--><?//= $results['radio']['1']; ?><!--</span><br/>-->
<!--    <input type="radio" name="--><?//= $results['id'] ?><!--" value="c"/><span>--><?//= $results['radio']['2']; ?><!--</span><br/>-->
<!--    <input type="radio" name="--><?//= $results['id'] ?><!--" value="d"/><span>--><?//= $results['radio']['3']; ?><!--</span><br/>-->
    </div>
       <br/>
    <button type="submit" value="提交" class="radius" id="alert-box" name="submit"/>提交</button>
        </div>
        </form>
    <button class="radius"  id="reset">点击重做</button>
<?php }else{ ?>
            <h2>您的分数为<?= $_SESSION['mark'] ?></h2>
      <h3>请不要随意刷新页面，避免造成绩丢失</h3>
      <button class="radius" id="reset">点击重做</button>
<?php } ?>
<?php //include("include/script.php"); ?>
<script src="./source/jquery.js"language="JavaScript"></script>
<script src="./source/radio.js" language="JavaScript"></script>
</body>
</html>